import {
	observer,
	inject
} from 'mobx-react';
import {
	Pagination
} from 'antd';
import Table from './Table';

@inject('hrmVacationBalanceReportCopy')
@observer
class DialogPagination extends React.Component {
	constructor(props) {
		super(props);
	}

	render() {
		const {
			hrmVacationBalanceReportCopy
		} = this.props, {
			dialogPagination,
			setCurrentPage,
			setSizePerPage,
			showTotal,
			getUsageRecordDetail,
		} = hrmVacationBalanceReportCopy, {
			current,
			pageSize,
			total,
		} = dialogPagination;

		return (
			<div style={{float: 'right', marginRight: 15}}>
				<Pagination ecId={`${this && this.props && this.props.ecId || ''}_Pagination@ffejfw`} 
					showQuickJumper
					showSizeChanger
					current = {current}
					defaultPageSize = {pageSize}
					pageSize={pageSize}
					total={total}
					showTotal={showTotal}
					onChange={(current) => setCurrentPage(current,'dialogPagination',getUsageRecordDetail)}
					onShowSizeChange={(current, pageSize) => setSizePerPage( pageSize,'dialogPagination',getUsageRecordDetail)}
				/>
			</div>
		);
	}
}

export default DialogPagination;